<?php
/**
 * Created by JetBrains PhpStorm.
 * User: GMC
 * Date: 10/3/13
 * Time: 2:20 PM
 * To change this template use File | Settings | File Templates.
 */

class WidgetSmallShopTypical extends CWidget {
    public $shops;

    public function init() {
        $shops = Ads::model()->findAll(array(
            'select' => 'ads_id, ads_name, description, url, image_path',
            'condition' => 'position = :position',
            'params' => array(':position' => 'shop-tieubieu')
        ));
        $this->shops = $shops;
    }

    public function run() {
        return CWidget::render('widgetSmallShopTypical', array('model' => $this->shops));
    }
}